<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of showStatistik
 *
 * @author christiangreweling
 */
class Zend_View_Helper_ShowAnalyticalGameCount extends Zend_View_Helper_Abstract {

    public function showAnalyticalGameCount($statsGameCount = null) {
        $played = $this->view->translate('Played games by kind');

        $html = '';
        if ($statsGameCount != null) {

            $html.='<script>';

            $html.='
            $(document).ready(function(){
                var plot1 = $.jqplot("analyticalGameCount",' . $statsGameCount . ', {
                title: "' . $played . '",
                seriesDefaults: {
                    renderer:$.jqplot.BarRenderer,       
                    shadowAngle: 45,
                    rendererOptions: {
                        barDirection: "horizontal",
                        barWidth: 15,
                        barMargin: 20
                    }
                },
                 grid:{
                background: "transparent",
                 borderWidth: 1.0
                 

                },
                axes: {
                    yaxis: { 
                        renderer: $.jqplot.CategoryAxisRenderer 
                     },
                    xaxis:{
                        min: 0,
                        tickInterval: 1,
                        tickOptions:{
                        
                            formatString:"%.0f" 
                        } 
                    }
                }
            });
           });';


            $html.= '</script>';
            $html.='<div id="analyticalGameCount" > </div>';
        }

        return $html;
    }

}

?>